import { RMIProxyObject } from "../../Engine/RMI/RMIProxyObject";
import { ILoginPrx } from "./ILoginPrx";
import { AMI_ILogin_createFirstRole } from "./AMI_ILogin_createFirstRole";
import { SFirstRole } from "./SFirstRole";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { Outgoing } from "../../Engine/RMI/Outgoing";
import { AMI_ILogin_login } from "./AMI_ILogin_login";
import { SLogin } from "./SLogin";
//class ILoginPrxHelper

export class ILoginPrxHelper extends RMIProxyObject implements ILoginPrx {
  constructor() {
    super();
    this.name = "ILogin";
    return;
  }

  public createFirstRole_async(
    arg1: AMI_ILogin_createFirstRole,
    arg2: SFirstRole
  ): void {
    var loc1 = this.makeContext(this.session);
    var loc2 = this.makeCall("createFirstRole");
    var loc3 = new SerializeStream();
    arg2.__write(loc3);
    Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
    return;
  }

  public login_async(arg1: AMI_ILogin_login, slogin: SLogin): void {
    var context = this.makeContext(this.session);
    var mcall = this.makeCall("login");
    var stream = new SerializeStream();
    slogin.__write(stream);
    Outgoing.invokeAsync(context, mcall, stream, arg1);
  }

  public static /* const */ NAME: string = "Message.Login.ILogin";
}
